package com.trainfinder.ripper;

import java.util.Calendar;
import java.util.Iterator;
import java.util.List;

import com.trainfinder.requestor.IJourney;
import com.trainfinder.requestor.Requestor;
import com.trainfinder.requestor.UnparsableException;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] a) {

		Calendar c = Calendar.getInstance();
		c.set(2007, 5, 20, 13, 0);
		Calendar returnDate = (Calendar) c.clone();
		returnDate.add(Calendar.DAY_OF_YEAR, 7);

		try {
			List<IJourney> list = new Requestor().getJourneis(
					new ExtractStandardTicketValuesImpl(), new DomParser(), c,
					returnDate, "london", "paris");
			for (Iterator iter = list.iterator(); iter.hasNext();) {
				IJourney element = (IJourney) iter.next();
				System.out.println(element.toString());
			}

		} catch (UnparsableException e) {
			// TODO Auto-generated catch block
		//	e.printStackTrace();
		}
	}

}
